package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSmsCode;
import com.appkubes.mall.core.po.MallSmsCodeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSmsCodeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSmsCodeSqlProvider.class, method="countByExample")
    long countByExample(MallSmsCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSmsCodeSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSmsCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_sms_code",
        "where code_key = #{codeKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String codeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_sms_code (code_key, app_key, ",
        "code, tel, is_use, ",
        "`type`, create_time, ",
        "update_time)",
        "values (#{codeKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{code,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, #{isUse,jdbcType=TINYINT}, ",
        "#{type,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER})"
    })
    int insert(MallSmsCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSmsCodeSqlProvider.class, method="insertSelective")
    int insertSelective(MallSmsCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSmsCodeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="code_key", property="codeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_use", property="isUse", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    List<MallSmsCode> selectByExampleWithRowbounds(MallSmsCodeExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSmsCodeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="code_key", property="codeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_use", property="isUse", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    List<MallSmsCode> selectByExample(MallSmsCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "code_key, app_key, code, tel, is_use, `type`, create_time, update_time",
        "from mall_sms_code",
        "where code_key = #{codeKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="code_key", property="codeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="code", property="code", jdbcType=JdbcType.VARCHAR),
        @Result(column="tel", property="tel", jdbcType=JdbcType.VARCHAR),
        @Result(column="is_use", property="isUse", jdbcType=JdbcType.TINYINT),
        @Result(column="type", property="type", jdbcType=JdbcType.TINYINT),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER)
    })
    MallSmsCode selectByPrimaryKey(String codeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSmsCodeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSmsCode record, @Param("example") MallSmsCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSmsCodeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSmsCode record, @Param("example") MallSmsCodeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSmsCodeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSmsCode record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_sms_code
     *
     * @mbg.generated
     */
    @Update({
        "update mall_sms_code",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "code = #{code,jdbcType=VARCHAR},",
          "tel = #{tel,jdbcType=VARCHAR},",
          "is_use = #{isUse,jdbcType=TINYINT},",
          "`type` = #{type,jdbcType=TINYINT},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER}",
        "where code_key = #{codeKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSmsCode record);
}